import 'dart:io';
import 'dart:convert';
void main() async {
  const host="http://127.0.0.1:8000";
  //dio.interceptors..add(CookieManager(CookieJar()))..add(LogInterceptor());
  HttpClient httpClient = new HttpClient();
  var uri=Uri.parse(host+"/rest/Contact");
  HttpClientRequest request = await httpClient.getUrl(uri);
  HttpClientResponse response = await request.close();
  String responseBody = await response.transform(utf8.decoder).join();
  var items=json.decode(responseBody);
  print(items["total"]);
  print(items["data"]);
  //Response response;
  //response=await dio.get("/test?id=12&name=wendu");
  //print(response.data.toString());
}